package org.dfg.corejava.jdk5;

public class EnumTest {
	public static void main(String[] args) {
		t1(Weather.spring);
	}

	public static void t1(Weather w) {
		System.out.println(w);
		System.out.println(w.value);
		System.out.println(w.name());
	}
}

enum Weather {
	spring("daf"), summer("gag");

	String value;

	Weather(String name) {
		this.value = name;
	}

	@Override
	public String toString() {
		return value;
	}

}
